# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VMwareEngine.V1.Model.HcxActivationKey do
  @moduledoc """
  HCX activation key. A default key is created during private cloud provisioning, but this behavior is subject to change and you should always verify active keys. Use VmwareEngine.ListHcxActivationKeys to retrieve existing keys and VmwareEngine.CreateHcxActivationKey to create new ones.

  ## Attributes

  *   `activationKey` (*type:* `String.t`, *default:* `nil`) - Output only. HCX activation key.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation time of HCX activation key.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of this HcxActivationKey. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of HCX activation key.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System-generated unique identifier for the resource.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activationKey => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :state => String.t() | nil,
          :uid => String.t() | nil
        }

  field(:activationKey)
  field(:createTime, as: DateTime)
  field(:name)
  field(:state)
  field(:uid)
end

defimpl Poison.Decoder, for: GoogleApi.VMwareEngine.V1.Model.HcxActivationKey do
  def decode(value, options) do
    GoogleApi.VMwareEngine.V1.Model.HcxActivationKey.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VMwareEngine.V1.Model.HcxActivationKey do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
